/**
	==========公共js==========
*/
//配置域名
if (/^localhost/.test(location.hostname)) { //localhost为本地环境
    var fileURL = ""
    var webURL = ""
}
else{
    var fileURL = location.protocol+"//"+location.host +"/fileweb";
    var webURL = location.protocol+"//"+location.host  //协议+主机+端口
}
/**
  util 为保留关键字,使用util作为命名空间
*/
;(function (global, undefined) {
  var util = {
    /**
     * 动态加载js
     * @param url 传入的url,单个直接是字符串形式，多个以数组形式
     * @param callback 加载js后的回调
     */
    loadScript: function (url, callback) {
      var script;
      if (typeof url == "string") {
        script = document.createElement("script");
        script.type = "text/javascript";
        script.async = true;
        script.defer = true;
        script.src = url;
      } else {
        for (var i = 0; i < url.length; i++) {
          script = document.createElement("script");
          script.type = "text/javascript";
          script.async = true;
          script.defer = true;
          script.src = url[i];
          document.body.appendChild(script);
        }
      }
      if (callback && typeof callback == "function") {
        if (script.readyState) {
          script.onreadystatechange = function () {
            if (
              script.readyState == "loaded" ||
              script.readyState == "complete"
            ) {
              script.onreadystatechange = null;
              callback();
            }
          };
        } else {
          script.onload = function () {
            callback();
          };
        }
      }
    },
    /**
     * 判断是否为IE浏览器
     */
    isIE: function () {
      if (!!window.ActiveXObject || "ActiveXObject" in window) return true;
      else return false;
    }
  };
  global.util = util;
})(window);
